Create the change to initialize target_list to an empty list instead of
authorMatthias Clasen <maclas@gmx.de>
Fri, 23 Jul 2004 17:06:44 +0000 (17:06 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 23 Jul 2004 17:06:44 +0000 (17:06 +0000)
Fri Jul 23 13:04:10 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtkdnd.c (gtk_drag_dest_set): Create the change to
initialize target_list to an empty list instead of NULL,
since it broke tree dnd.  (#148215, Ernst Persson)

* gtk/gtkdnd.c (gtk_drag_dest_add_text_targets):
* gtk/gtkdnd.c (gtk_drag_source_add_text_targets): Instead
handle target list being NULL here.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkdnd.c

index fb89669d8b72afecbc5880a787cfaaa9ef115981..fbe1a300f578e4b6e9892e97518e4367be396ad0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,15 @@
+Fri Jul 23 13:04:10 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkdnd.c (gtk_drag_dest_set): Create the change to
+       initialize target_list to an empty list instead of NULL,
+       since it broke tree dnd.  (#148215, Ernst Persson)
+
+       * gtk/gtkdnd.c (gtk_drag_dest_add_text_targets): 
+       * gtk/gtkdnd.c (gtk_drag_source_add_text_targets): Instead 
+       handle target list being NULL here.
+
 2004-07-23  Dafydd Harries  <daf@muse.19inch.net>
 
-Fri Jul 23 16:35:23 2004
        * gtk/gtkradioaction.c:
        * gtk/gtkradiobutton.c:
        * gtk/gtkentry.c:
@@ -10,7 +19,7 @@ Fri Jul 23 16:35:23 2004
 Fri Jul 23 11:11:10 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_start_editing): 
-       align the entry in the same way as the cell.  (#136749)
+       Align the entry in the same way as the cell.  (#136749)
 
 Fri Jul 23 11:01:00 2004  Matthias Clasen  <maclas@gmx.de>
 
index fb89669d8b72afecbc5880a787cfaaa9ef115981..fbe1a300f578e4b6e9892e97518e4367be396ad0 100644 (file)
@@ -1,6 +1,15 @@
+Fri Jul 23 13:04:10 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkdnd.c (gtk_drag_dest_set): Create the change to
+       initialize target_list to an empty list instead of NULL,
+       since it broke tree dnd.  (#148215, Ernst Persson)
+
+       * gtk/gtkdnd.c (gtk_drag_dest_add_text_targets): 
+       * gtk/gtkdnd.c (gtk_drag_source_add_text_targets): Instead 
+       handle target list being NULL here.
+
 2004-07-23  Dafydd Harries  <daf@muse.19inch.net>
 
-Fri Jul 23 16:35:23 2004
        * gtk/gtkradioaction.c:
        * gtk/gtkradiobutton.c:
        * gtk/gtkentry.c:
@@ -10,7 +19,7 @@ Fri Jul 23 16:35:23 2004
 Fri Jul 23 11:11:10 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_start_editing): 
-       align the entry in the same way as the cell.  (#136749)
+       Align the entry in the same way as the cell.  (#136749)
 
 Fri Jul 23 11:01:00 2004  Matthias Clasen  <maclas@gmx.de>
 
index fb89669d8b72afecbc5880a787cfaaa9ef115981..fbe1a300f578e4b6e9892e97518e4367be396ad0 100644 (file)
@@ -1,6 +1,15 @@
+Fri Jul 23 13:04:10 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkdnd.c (gtk_drag_dest_set): Create the change to
+       initialize target_list to an empty list instead of NULL,
+       since it broke tree dnd.  (#148215, Ernst Persson)
+
+       * gtk/gtkdnd.c (gtk_drag_dest_add_text_targets): 
+       * gtk/gtkdnd.c (gtk_drag_source_add_text_targets): Instead 
+       handle target list being NULL here.
+
 2004-07-23  Dafydd Harries  <daf@muse.19inch.net>
 
-Fri Jul 23 16:35:23 2004
        * gtk/gtkradioaction.c:
        * gtk/gtkradiobutton.c:
        * gtk/gtkentry.c:
@@ -10,7 +19,7 @@ Fri Jul 23 16:35:23 2004
 Fri Jul 23 11:11:10 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_start_editing): 
-       align the entry in the same way as the cell.  (#136749)
+       Align the entry in the same way as the cell.  (#136749)
 
 Fri Jul 23 11:01:00 2004  Matthias Clasen  <maclas@gmx.de>
 
index fb89669d8b72afecbc5880a787cfaaa9ef115981..fbe1a300f578e4b6e9892e97518e4367be396ad0 100644 (file)
@@ -1,6 +1,15 @@
+Fri Jul 23 13:04:10 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkdnd.c (gtk_drag_dest_set): Create the change to
+       initialize target_list to an empty list instead of NULL,
+       since it broke tree dnd.  (#148215, Ernst Persson)
+
+       * gtk/gtkdnd.c (gtk_drag_dest_add_text_targets): 
+       * gtk/gtkdnd.c (gtk_drag_source_add_text_targets): Instead 
+       handle target list being NULL here.
+
 2004-07-23  Dafydd Harries  <daf@muse.19inch.net>
 
-Fri Jul 23 16:35:23 2004
        * gtk/gtkradioaction.c:
        * gtk/gtkradiobutton.c:
        * gtk/gtkentry.c:
@@ -10,7 +19,7 @@ Fri Jul 23 16:35:23 2004
 Fri Jul 23 11:11:10 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_start_editing): 
-       align the entry in the same way as the cell.  (#136749)
+       Align the entry in the same way as the cell.  (#136749)
 
 Fri Jul 23 11:01:00 2004  Matthias Clasen  <maclas@gmx.de>
 
index 2f9862e7c779b836c19d04795d94eafe690539dd..a8a139e7020df00b922ff86e59cbeb7cec9a5674 100644 (file)
@@ -901,7 +901,7 @@ gtk_drag_dest_set   (GtkWidget            *widget,
 
   site->flags = flags;
   site->have_drag = FALSE;
-  site->target_list = gtk_target_list_new (targets, n_targets);
+  site->target_list = NULL;
   site->actions = actions;
   site->do_proxy = FALSE;
   site->proxy_window = NULL;
@@ -1036,6 +1036,8 @@ gtk_drag_dest_add_text_targets (GtkWidget *widget)
   GtkTargetList *target_list;
 
   target_list = gtk_drag_dest_get_target_list (widget);
+  if (!target_list)
+    target_list = gtk_target_list_new (NULL, 0);
   gtk_target_list_add_text_targets (target_list);
   gtk_drag_dest_set_target_list (widget, target_list);
 }
@@ -2198,6 +2200,8 @@ gtk_drag_source_add_text_targets (GtkWidget *widget)
   GtkTargetList *target_list;
 
   target_list = gtk_drag_source_get_target_list (widget);
+  if (!target_list)
+    target_list = gtk_target_list_new (NULL, 0);
   gtk_target_list_add_text_targets (target_list);
   gtk_drag_source_set_target_list (widget, target_list);
 }